
#ifndef _MEMBER_BDIALOG_H_
#define _MEMBER_BDIALOG_H_

#include <BButton>
#include <BHBoxLayout>
#include <BDialog>
#include "IGlobal.h"
#include "IAlignment.h"

namespace BWE
{

	class member_BDialog : public BObject
	{
		friend class BDialog;
	public:
		static const char* ButtonName(Button button);
		static Graph ButtonGraph(Button button);

	public:
		member_BDialog(BDialog* dialog);
		~member_BDialog();

		bool resizeale();
		void freshRects();

		void slotTitleButtonClicked(BObject* object, const BValue& value);
		void slotParentResized(BObject* object, const BValue& value);

		BDialog*			boss;
		BSize				titleIconSize;
		BMargin				titleMargin;
		int					titleSpace;
		int					titleHeight;
		IAlignment			alignment;
		int					result;
		ShowState			showState;
		BRect				normalRect;
		bool				moved;
		Align				buttonAlign;
		BHBoxLayoutHolder	buttonLayout;

		Part			ignorePart;
		Part			resizePart;
		BRect			titleRect;
		BRect			borderTop;
		BRect			borderLeft;
		BRect			borderRight;
		BRect			borderBottom;
		BRect			cornerLeftTop;
		BRect			cornerRightTop;
		BRect			cornerLeftBottom;
		BRect			cornerRightBottom;

		bool			dirty;
		BString			tr_title;
		bool			hoverTitle;
		bool			pressed;
		BPoint			pressedPos;
		BRect			pressedRect;
	};
}

#endif